<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
    /**
     * @author 谭湘元
     * @since 2009/04/23
     */
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>聋校备课与语言学习及矫治系统</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link href="<%=request.getContextPath()%>/<fmt:message key='StylePath' />style2.css"
	rel="stylesheet" type="text/css" />
<style type="text/css">
	#apDiv1 {
		position:absolute;
		left:560px;
		top:19px;
		width:22px;
		height:22px;
		z-index:1;
	}
</style>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function ChangeWindows()
{
   if(parent.document.all.jzmains.cols=="203,*,167")
   {
      parent.document.all.jzmains.cols="0,*,0";
      //parent.document.all.jztops.rows="120,*,0";
      document.getElementById("Image5").src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/exit.gif";
      document.getElementById("cenht").height=screen.availHeight-276;
   }
   else
   {
       parent.document.all.jzmains.cols="203,*,167";
       //parent.document.all.jztops.rows="120,480,*";
       document.getElementById("Image5").src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/full.gif";
       document.getElementById("cenht").height=492;
   }
}
function freshContent(html){
	document.getElementById("content").innerHTML = html;
}
var leftWindow;
var bottomWindow;


function startEvaluation(){
	soundWaveApplet.clearOldWaves();//清空applet中原有的波形数据
	
	t_ocx.SetParamer("interval", "20");
	  
	leftWindow.ocx_work_dev = t_ocx.SetParamer("wavefile0", "wave_0.pcm"); // 设置保存原始波形文件名（pcm 格式）
	if(leftWindow.ocx_work_dev==""){
		alert("页面控件错误！");
	}
	t_ocx.SetParamer("wavefile1", "wave_1.data"); // 设置保存包络波形文件名
	t_ocx.SetParamer("wavefile2", "wave_2.data"); // 设置保存音强波形文件名
	t_ocx.SetParamer("wavefile3", "wave_3.data"); // 设置保存基频波形文件名
	t_ocx.SetParamer("wavefile4", "wave_4.data"); // 设置保存有无声波形文件名
	t_ocx.SetParamer("recordfile", leftWindow.wav_name); // 设置保存录音文件文件名
	t_ocx.SetEvalLevel(bottomWindow.evaluateLevel);
	/* 设置以上参数表示要保存相应波形，否则不保存 */
	t_ocx.InitEngine(); // 初始化引擎
	
	t_ocx.DoEvaluation(leftWindow.sound_text, "");
}
function getWindowHeight(){
	return document.body.clientHeight;
}
function getWindowWidth(){
	return document.body.offsetWidth;
}
function init(){
	leftWindow = self.parent.frames["left"];
	bottomWindow = self.parent.frames["bottomFrame"];
	MM_preloadImages('<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/exit.gif');
	if(leftWindow.centerLoadCallback){
		leftWindow.centerLoadCallback();
	}
	
}
</script>

</head>

<body class="center_style" onload="init();">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top" bgcolor="#EDEFE9"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="14" height="15" align="right" valign="bottom"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_01.gif" /></td>
        <td background="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_06.gif">&nbsp;</td>
        <td width="14" height="15" align="left" valign="bottom"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_02.gif" /></td>
      </tr>
      <tr>
        <td id="cenht" height="492" background="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_05.gif">&nbsp;</td>
        <td align="center" valign="middle" bgcolor="#FFFFFF">
			<div id="apDiv1" style="POSITION: absolute; TOP:10px; left:10px;z-index: 1">
				<a href="#" onfocus="this.blur()">
					<img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/full.gif" name="Image5" width="22" height="22" border="0" id="Image5" onclick="ChangeWindows()" />
				</a>
			</div>
			<div id="content" style="width:100%;height:100%;z-index: -1;"></div>
		</td>
        <td background="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_08.gif">&nbsp;</td>
      </tr>
      <tr>
        <td width="14" height="15" align="right" valign="top"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_03.gif" /></td>
        <td background="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_07.gif">&nbsp;</td>
        <td width="14" height="15" align="left" valign="top"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jz_img/jzxx/center_04.gif"/></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
